package com.hnzq.cloud.api;


import com.hnzq.cloud.IO.AddCarIO;
import com.hnzq.cloud.IO.entity.FreCar;
import com.hnzq.cloud.model.Result;
import com.hnzq.cloud.util.FreException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "send-assembly",contextId = "freCar",path = "freCar")
public interface FreCarApi {
    @GetMapping("getByUserId")
    Result getByUserId(@RequestParam("id")Integer id) throws FreException;

    @GetMapping("getAll")
    Result<List<FreCar>> getAll(    );

    @PostMapping("add")
    Result addCar(@RequestBody AddCarIO addCarIO);

    @PutMapping("edit")
    Result editCar(@RequestBody AddCarIO addCarIO);

    @DeleteMapping("delete")
    Result deleteCar(@RequestParam("id") Integer id);

}
